{# templates/server/account/update_password.html #}
{% extends "layouts/base.html" %}
{% load i18n %}

{% block content %}
<div class="container mt-5">
  <div class="card shadow-lg p-4">
    <h2 class="text-center mb-4">{% trans "Alterar Senha" %}</h2>

    <form method="post">
      {% csrf_token %}

      {% if messages %}
        {% for message in messages %}
          <div class="alert alert-{{ message.tags }}">{{ message }}</div>
        {% endfor %}
      {% endif %}

      <div class="mb-3">
        <label for="nova_senha" class="form-label">{% trans "Nova Senha" %}</label>
        <input type="password" name="nova_senha" id="nova_senha" class="form-control" required>
      </div>

      <div class="mb-3">
        <label for="confirmar_senha" class="form-label">{% trans "Confirmar Nova Senha" %}</label>
        <input type="password" name="confirmar_senha" id="confirmar_senha" class="form-control" required>
      </div>

      <div class="d-grid">
        <button type="submit" class="btn btn-primary btn-lg">{% trans "Salvar Senha" %}</button>
      </div>
    </form>

    <div class="text-center mt-3">
      <a href="{% url 'server:account_dashboard' %}" class="btn btn-link">{% trans "Voltar para Dashboard" %}</a>
    </div>
  </div>
</div>
{% endblock %}
